<?php ?>
<!DOCTYPE html>
<html>
    <head>
        <? require_once 'header.php'; ?>
    </head>
    <body>
        <?php
        getNavbar();
        ?>
        <div class="container-fluid" style="margin-top: 60px;">
            <div class="row-fluid">
                <div class="span3 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="">Empresas cadastradas</a>
                        </div>
                        <div class="container well">
                            <? Visual::getEmpresasVertical(); ?>
                        </div>
                    </div>
                </div>
                <div class="span6 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <ul class="nav">
                                <li class="active"><a href="#cadastroEmpresa" data-toggle="tab"><i class="icon-home"></i>Empresa</a></li>
                                <!--<li><a href="#cadastroPromotor" data-toggle="tab"><i class="icon-list-alt"></i>Promotor</a></li>-->
                            </ul>
                        </div>
                        <div class="container well">
                            <div class="tab-content">
                                <div class="tab-pane active" id="cadastroEmpresa">
                                    <div id='lblInfoCadastro'>
                                    </div>
                                    <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data" onsubmit="return (ValidarCNPJ(this.edtCnpj) && ValidaTelefone(this.edtFone))"> 
                                        <input type="hidden" id="formCadastroEmpresa" name="formCadastroEmpresa" value="formCadastroEmpresa"/>
                                        <div class="control-group">
                                            <label class="control-label" for="edtNome">Nome</label>
                                            <div class="controls">
                                                <input type="text" id="edtNome" name="edtNome" placeholder="Nome" required="required"/>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtCnpj">CNPJ</label>
                                            <div class="controls">
                                                <input type="text" id="edtCnpj" name="edtCnpj" placeholder="CNPJ" required="required" onKeyPress="MascaraCNPJ(this);" maxlength="18" onBlur="ValidarCNPJ(this);">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtCategoria">Categoria</label>
                                            <div class="controls">
                                                <select id="edtCategoria" multiple="multiple" name="edtCategoria[]" required="required">
                                                    <?
                                                    $dce = new DAOCategoriaEmpresa();
                                                    $categorias = $dce->getCategorias();
                                                    foreach ($categorias as $cat) {
                                                        ?>
                                                        <option value='<? echo $cat->getCodigo(); ?>' ><? echo $cat->getDescricao(); ?></option>
                                                        <?
                                                    }
                                                    ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtPais">Pais</label>
                                            <div class="controls">
                                                <select id="edtPais" name="edtPais" required="required">
                                                    <?
                                                    $dp = new DAOPais();
                                                    $paises = $dp->getPaises();
                                                    foreach ($paises as $pais) {
                                                        ?>
                                                        <option value="<?php echo $pais->getCodigo(); ?>" <?php if ($pais->getCodigo() == 1) { ?> selected="true"<?php } ?>><?php echo $pais->getNome(); ?></option>
                                                        <?php
                                                    }
                                                    ?>

                                                </select>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEstado">Estado</label>
                                            <div class="controls">
                                                <select id="edtEstado" name="edtEstado" onchange="buscar_cidades();" required="required">
                                                    <option value="">Selecione</option>
                                                    <?
                                                    $de = new DAOEstado();
                                                    $estados = $de->getEstados();
                                                    foreach ($estados as $es) {
                                                        ?>
                                                        <option value="<?php echo $es->getCodigo(); ?>"><?php echo $es->getNome(); ?></option>
                                                        <?php
                                                    }
                                                    ?>

                                                </select>
                                                <!--<input type="text" id="edtEstado" name="edtEstado" placeholder="Estado">-->
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtCidade">Cidade</label>
                                            <div class="controls" id="cidade">
                                                <select id="edtCidade" name="edtCidade" required="required">
                                                    <option value="">Selecione o estado</option>
                                                </select>
                                                <!--<input type="text" id="edtCidade" name ="edtCidade" placeholder="Cidade">-->
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtBairro">Bairro</label>
                                            <div class="controls">
                                                <input type="text" id="edtBairro" name="edtBairro" placeholder="Bairro" required="required">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEndereco">Endereço</label>
                                            <div class="controls">
                                                <input type="text" id="edtEndereco" name="edtEndereco" placeholder="Endereço" required="required">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtNumero">Número</label>
                                            <div class="controls">
                                                <input type="text" id="edtNumero" name="edtNumero" placeholder="Número" required="required" onkeypress="mascaraInteiro(this);">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtFone">Fone</label>
                                            <div class="controls">
                                                <input type="text" id="edtFone" name="edtFone" placeholder="Fone" onkeypress="MascaraTelefone(this)">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEmail">Email</label>
                                            <div class="controls">
                                                <input type="email" id="edtEmail" name="edtEmailEmpresa" placeholder="Email" required="required">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtSenha">Senha</label>
                                            <div class="controls">
                                                <input type="password" id="edtSenha" name="edtSenhaEmpresa" placeholder="Senha" required="required">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtFoto">Imagem Principal</label>
                                            <div class="controls">
                                                <input type="file" id="edtFoto" name="edtFoto"/>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtPlano">Planos</label>
                                            <div class="controls">
                                                <div class="control-group">
                                                    <label class="control-label">Primeiro Mês Gratis!</label>
                                                    <div class="controls">
                                                        <input type="radio" name="edtPlano" value="30" required=""></input>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">30 Dias R$: xx,99  </label>
                                                    <div class="controls">
                                                        <input type="radio" name="edtPlano" value="30" required=""></input>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">90 Dias R$: XX,99  </label>
                                                    <div class="controls">
                                                        <input type="radio" name="edtPlano" value="90" required=""></input>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">365 Dias R$: XXX,99  </label>
                                                    <div class="controls">
                                                        <input type="radio" name="edtPlano" value="365" required=""></input>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <div class="controls">
                                                <label class="">Ao clicar em cadastrar concordo com os <a href="/termosDeUso">Termos de Uso</a> e a <a href="/politica">Politica de Privacidade</a></label>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <div class="controls">
                                                <button type="submit" class="btn">Cadastrar</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>

                                <div class="tab-pane" id="cadastroPromotor">
                                    <form class="form-horizontal" method="POST" action="">
                                        <input type="hidden" id="formCadastroPromotor" name="formCadastroPromotor"/>
                                        <div class="control-group">
                                            <label class="control-label" for="edtNome">Nome</label>
                                            <div class="controls">
                                                <input type="text" id="edtNome" placeholder="Nome">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtCpf">CPF</label>
                                            <div class="controls">
                                                <input type="text" id="edtCpf" placeholder="CPF">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtRg">RG</label>
                                            <div class="controls">
                                                <input type="text" id="edtRg" placeholder="RG">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEndereco">Endereço</label>
                                            <div class="controls">
                                                <input type="text" id="edtNome" placeholder="Endereço">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtNumero">Número</label>
                                            <div class="controls">
                                                <input type="text" id="edtNumero" placeholder="Número">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtBairro">Bairro</label>
                                            <div class="controls">
                                                <input type="text" id="edtBairro" placeholder="Bairro">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtCidade">Cidade</label>
                                            <div class="controls">
                                                <input type="text" id="edtCidade" placeholder="Cidade">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEstado">Estado</label>
                                            <div class="controls">
                                                <input type="text" id="edtCidade" placeholder="Estado">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtPais">Pais</label>
                                            <div class="controls">
                                                <input type="text" id="edtPais" placeholder="Pais">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtFone">Fone</label>
                                            <div class="controls">
                                                <input type="text" id="edtFone" placeholder="Fone">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtEmail">Email</label>
                                            <div class="controls">
                                                <input type="email" id="edtEmail" placeholder="Email">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label class="control-label" for="edtSenha">Senha</label>
                                            <div class="controls">
                                                <input type="password" id="edtSenha" placeholder="Senha">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <div class="controls">
                                                <label class="">Ao clicar em cadastrar concordo com os <a href="/termosDeUso">Termos de Uso</a> e a <a href="/politica">Politica de Privacidade</a></label>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <div class="controls">
                                                <button type="submit" class="btn">Cadastrar</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="span3 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="">Eventos</a>
                        </div>
                        <div class="container well">
                            <? Visual::getEventosVertical(); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?
        require_once 'footer.php';
        ?>
    </body>
</html>
